fix sticky ADMIN_KW - #834
Open
d-w-moore wants to merge 5 commits into
Open
Conversation
korydraughn
reviewed
Sep 9, 2026
| def __init__(self, *_): | ||
| self._opts = _MetadataManager_opts_initializer.copy() | ||
| super().__init__(*_) | ||
| self.__kw = self.__default_kw.copy() |
Contributor
There was a problem hiding this comment.
Does this require a named variable (i.e. self.__default_kw)?
Isn't this equivalent to self.__kw = {}?
I'm not requesting anything change. Just curious.
| d.metadata.set('a','b') | ||
| else: | ||
| d.metadata(admin=True) | ||
| sessions.append(ses) |
Contributor
There was a problem hiding this comment.
Is ses still active beyond the with-block?
Wouldn't the cleanup logic run at the end of the with-block?
Comment on lines
+808
to
+824
| sessions = [] | ||
| for _ in range(2): | ||
| with iRODSSession( | ||
| port=adm.port, | ||
| zone=adm.zone, | ||
| host=adm.host, | ||
| user=user.name, | ||
| password="bpass", | ||
| ) as ses: | ||
| # Create a data object owned by the rodsuser. Set AVUs in various ways and guarantee each attempt | ||
| # has the desired effect. | ||
| d = ses.data_objects.create("/{adm.zone}/home/{user.name}/testfile".format(**locals())) | ||
| if sessions: | ||
| d.metadata.set('a','b') | ||
| else: | ||
| d.metadata(admin=True) | ||
| sessions.append(ses) |
Contributor
There was a problem hiding this comment.
Can we simplify this by dropping the for-loop?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use of ADMIN_KW carried over into subsequent metadata calls even if unwanted.